****************************************************************************************
* Replication code for "Shaping Identity: Evidence from a Large-Scale Field Experiment *
****************************************************************************************
* This program was run on Stata/SE 15.1 on a Mac personal computer.

** Make sure the following programs are installed. If not unmute the next lines
* ssc install winsor 
* ssc install twopm 
* ssc install ebalance   
* ssc install estout, replace

clear all
set more off
set seed 15688

global filepath "/Users/sebastiantonke/Desktop/Replication Package Shaping Identity" // <----- set your filepath here

********************* Setting Subdirectories  ***********************
global data  	"$filepath/data"
global dofiles	"$filepath/do_files"
global output	"$filepath/output_logs"
global temp		"$filepath/temp" 

********************** Preparing Datasets ***************************
do "$dofiles/data_preparation"
do "$dofiles/data_preparation_survey"


********************** Tables Main Text *****************************
do "$dofiles/table 1"
do "$dofiles/table 2" 
do "$dofiles/table 3"
do "$dofiles/table 4" 
do "$dofiles/table 5"

**********************  Figures Main Text ***************************
do "$dofiles/figure 1"
do "$dofiles/figure 4" // Runs table b2 before
do "$dofiles/figure 5" // Runs table b7 before
do "$dofiles/figure 6"
do "$dofiles/figure 7" // Runs table b12 before
do "$dofiles/figure 8" // Runs table b13 before
do "$dofiles/figure 9" // Runs table b15 before
do "$dofiles/figure 10" 

********************** Appendix A ***********************************
do "$dofiles/figure a4" 
do "$dofiles/table a5"
do "$dofiles/table a6" 

********************** Appendix B ***********************************
do "$dofiles/table b2" 
do "$dofiles/table b3" 
do "$dofiles/table b4"
do "$dofiles/table b5"
do "$dofiles/table b6" 
do "$dofiles/table b7" 
do "$dofiles/table b8" 
do "$dofiles/table b9" 
do "$dofiles/table b10" 
do "$dofiles/table b11" 
do "$dofiles/table b12" 
do "$dofiles/table b13" 
do "$dofiles/table b14" 
do "$dofiles/table b15"

********************** Appendix C ***********************************
do "$dofiles/figure c1" 
do "$dofiles/figure c2"
do "$dofiles/figure c3"










